@echo off
set INSTALLATIONPATH=%1

:: Remove quotes
SET INSTALLATIONPATH=###%INSTALLATIONPATH%###
SET INSTALLATIONPATH=%INSTALLATIONPATH:"###=%
SET INSTALLATIONPATH=%INSTALLATIONPATH:###"=%
SET INSTALLATIONPATH=%INSTALLATIONPATH:###=%

set EMANTCLASSPATH=%INSTALLATIONPATH%/jboss-as/scripts/ant/lib/ant-launcher.jar
set EMANTHOME=%INSTALLATIONPATH%/jboss-as/scripts/ant
set EMSCRIPT=%INSTALLATIONPATH%/jboss-as/scripts/deploy-demos.xml
cmd /c java -classpath "%EMANTCLASSPATH%" -Dant.home="%EMANTHOME%" org.apache.tools.ant.launch.Launcher -f "%EMSCRIPT%" -Ddemo=%2